package com.jiguang.property.controller;


import com.jiguang.property.annotation.Log;
import com.jiguang.property.dto.BuildInfoDTO;
import com.jiguang.property.dto.OperateLogDTO;
import com.jiguang.property.service.OperateLogService;
import com.jiguang.property.utils.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author testjava
 * @since 2025-03-09
 */
@RestController
@RequestMapping("/operateLog")
public class OperateLogController {

    @Autowired
    private OperateLogService operateLogService;

    @ApiOperation(value = "查询操作日志列表")
    @PostMapping("list")
    @Log(name = "查询操作日志列表")
    public Result list(@RequestBody OperateLogDTO operateLogDTO) {
        return operateLogService.listBuildInfoByUserId(operateLogDTO);
    }

    @ApiOperation(value = "近七天访问记录")
    @PostMapping("getRecord")
    public Result getRecord() {
        return operateLogService.getRecord();
    }

}

